﻿
IF object_id(N'dbo.[UDS_Flow_Files]', 'U') IS NULL
BEGIN
    CREATE TABLE [dbo].[UDS_Flow_Files] (
        [FileID]         int           NOT NULL identity(1, 1),
        [DocID]          int           NULL,
        [FileName]       nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL,
        [FileSize]       int           NULL,
        [FileAttribute]  int           NULL,
        [FileVisualPath] nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL,
        [FileAuthor]     nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL,
        [FileCatlog]     nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL,
        [FileAddedDate]  datetime      NULL,

        CONSTRAINT [PK_UDS_Flow_Files] PRIMARY KEY (FileID asc),
        CONSTRAINT [FK_UDS_Flow_Files_DocID] FOREIGN KEY (DocID) REFERENCES dbo.UDS_Flow_Document(Doc_ID)
    );
END
GO
